package data.nanjing.expo.models.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import data.nanjing.expo.common.DateTimeUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created by zjp on 2018/2/27.
 * QQ：34948062
 * github: https://www.github.com/zjp1029
 * web： http://www.zjp1029.cn
 * 展商发布需求信息表
 * trade_require
 */

public class TradeRequire {

    private Integer id;

    private String requirement; //需求

    private String serviceLocation; //服务地点

    private Integer servicePrice;   //服务时间

    private Integer userId;

    private Integer serviceType;    //类型id

    private String serviceTypeName; //类型名

    private String refuseReason;

    private String requireStatus;

    private Integer bidNumber;  //已经投标人数

    private  String title;

    private Integer bidDay;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date bidEndTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;    //创建时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;   //结束时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;   //结束时间

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRequirement() {
        return requirement;
    }

    public void setRequirement(String requirement) {
        this.requirement = requirement;
    }

    public String getServiceLocation() {
        return serviceLocation;
    }

    public void setServiceLocation(String serviceLocation) {
        this.serviceLocation = serviceLocation;
    }

    public Integer getServicePrice() {
        return servicePrice;
    }

    public void setServicePrice(Integer servicePrice) {
        this.servicePrice = servicePrice;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getServiceType() {
        return serviceType;
    }

    public void setServiceType(Integer serviceType) {
        this.serviceType = serviceType;
    }

    public String getRefuseReason() {
        return refuseReason;
    }

    public void setRefuseReason(String refuseReason) {
        this.refuseReason = refuseReason;
    }

    public String getRequireStatus() {
        return requireStatus;
    }

    public void setRequireStatus(String requireStatus) {
        this.requireStatus = requireStatus;
    }

    public Integer getBidNumber() {
        return bidNumber;
    }

    public void setBidNumber(Integer bidNumber) {
        this.bidNumber = bidNumber;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Integer getBidDay() {
        return bidDay;
    }

    public void setBidDay(Integer bidDay) {
        this.bidDay = bidDay;
    }

    public String getBidEndTime() {
        return DateTimeUtil.dateFormat(bidEndTime, DateTimeUtil.MINUTE_PATTERN);
    }

    public void setBidEndTime(Date bidEndTime) {
        this.bidEndTime = bidEndTime;
    }

    public String getCreateTime() {
        return DateTimeUtil.dateFormat(createTime, DateTimeUtil.MINUTE_PATTERN);
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return DateTimeUtil.dateFormat(updateTime, DateTimeUtil.MINUTE_PATTERN);
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getEndTime() {
        return DateTimeUtil.dateFormat(endTime, DateTimeUtil.MINUTE_PATTERN);
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public String getStartTime() {
        return DateTimeUtil.dateFormat(startTime, DateTimeUtil.MINUTE_PATTERN);
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public String getServiceTypeName() {
        return serviceTypeName;
    }

    public void setServiceTypeName(String serviceTypeName) {
        this.serviceTypeName = serviceTypeName;
    }

    @Override
    public String toString() {
        return "TradeRequire{" +
                "id=" + id +
                ", requirement='" + requirement + '\'' +
                ", serviceLocation='" + serviceLocation + '\'' +
                ", servicePrice=" + servicePrice +
                ", userId=" + userId +
                ", serviceType=" + serviceType +
                ", refuseReason='" + refuseReason + '\'' +
                ", requireStatus='" + requireStatus + '\'' +
                ", bidNumber=" + bidNumber +
                ", title='" + title + '\'' +
                ", bidDay=" + bidDay +
                ", bidEndTime=" + bidEndTime +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", endTime=" + endTime +
                ", startTime=" + startTime +
                '}';
    }
}
